﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FindArbitrageConsole.Data;
using FindArbitrageConsole.Data.Model;

namespace FindArbitrageConsole.Equals
{
    class KefDataPartComparer : IEqualityComparer<KefData>
    {
        public bool Equals(KefData x, KefData y)
        {
            return  x.EventId == y.EventId &&
                    x.MarketId == y.MarketId &&
                    x.SelectionId == y.SelectionId;
        }

        public int GetHashCode(KefData obj)
        {
            return new { obj.EventId, obj.MarketId, obj.SelectionId}.GetHashCode();
        }
    }
}
